using System;
using System.Collections.Generic;
using System.Text;

namespace Budgetor
{
    public class Data : IComparable
    {
        private DateTime date;

        public DateTime Date
        {
            get { return date; }
            set { date = value.Date; }
        }

        private string description;

        public string Description
        {
            get { return description; }
            set { description = value; }
        }

        private float amountSpent;

        public float AmountSpent
        {
            get { return amountSpent; }
            set { amountSpent = value; }
        }

        private float amountReimbursed;

        public float AmountReimbursed
        {
            get { return amountReimbursed; }
            set { amountReimbursed = value; }
        }

        private string currencyMode;

        public string CurrencyMode
        {
            get { return currencyMode; }
            set { currencyMode = value; }
        }

        private string category;

        public string Category
        {
            get { return category; }
            set { category = value; }
        }

        public override string ToString()
        {
            return date.ToString("dd MMM yy");
        }

        #region IComparable Members

        public int CompareTo(object obj)
        {
            return this.date.CompareTo((obj as Data).date);
        }

        #endregion
    }
}
